Value

open class Value

Wrapper class for value, complies to the mapbox type system.

Constructors

Value
Link copied to clipboard
open fun Value(d: Double)
Create a value from a double.
Value
Link copied to clipboard
open fun Value(l: Long)
Create a value from a long.
Value
Link copied to clipboard
open fun Value(b: Boolean)
Create a value from a boolean.
Value
Link copied to clipboard
open fun Value(@NonNull() str: String)
Create a value from a string.
Value
Link copied to clipboard
open fun Value(@NonNull() array: List<Value>)
Create a value from an list.
Value
Link copied to clipboard
open fun Value(@NonNull() map: HashMap<String, Value>)
Create a value from a map.

Functions

equals
Link copied to clipboard
open fun equals(other: Any): Boolean
fromJson
Link copied to clipboard
open fun fromJson(@NonNull() json: String): Expected<String, Value>
Converts JSON string to a value.
hashCode
Link copied to clipboard
open fun hashCode(): Int
nullValue
Link copied to clipboard
open fun nullValue(): Value
Create a null value
toJson
Link copied to clipboard
open fun toJson(): String
Converts value to a JSON string.The method is intended to be used when `machine-readable` string is needed.
toString
Link copied to clipboard
open fun toString(): String
valueOf
Link copied to clipboard
open fun valueOf(b: Boolean): Value
Create a value from a boolean.
open fun valueOf(d: Double): Value
Create a value from a double.
open fun valueOf(@NonNull() str: String): Value
Create a value from a string.
open fun valueOf(@NonNull() map: HashMap<String, Value>): Value
Create a value from a map
open fun valueOf(@NonNull() array: List<Value>): Value
Create a value from an list
open fun valueOf(l: Long): Value
Create a value from a long.

Properties

contents
Link copied to clipboard
private open val contents: Any

Inheritors

Expression
Link copied to clipboard

Extensions

unwrapToAny
Link copied to clipboard
fun Value.unwrapToAny(): Any
Extension function for Value to unwrap Value to Any.
unwrapToExpression
Link copied to clipboard
fun Value.unwrapToExpression(): Expression
Extension function for Value to unwrap Value to Expression.
unwrapToStyleTransition
Link copied to clipboard
fun Value.unwrapToStyleTransition(): StyleTransition
Extension function for Value to unwrap Value to StyleTransition.
unwrapToTyped
Link copied to clipboard
inline fun <T> Value.unwrapToTyped(): T
Extension function for Value to unwrap Value to the given type.